import React from 'react'
import styles from './index.module.less'
import { NavBar } from 'antd-mobile'

interface propsType {
    title?: string
}

export default function Navbar({ title }: propsType) {
    // 返回上一页
    const back = () => {
        window.history.back()
    }
    return (
        <div className={styles.navBar}>
            <NavBar back='返回' onBack={back}>
                {title}
            </NavBar>
        </div>
    )
}
